package com.imooc.sell.VO.pan;

import com.imooc.sell.dataobject.Remark;

import java.text.SimpleDateFormat;

@SuppressWarnings("all")
public class RemarkVO {
    private String remarkId;

    public String getRemarkId() {
        return remarkId;
    }

    public void setRemarkId(String remarkId) {
        this.remarkId = remarkId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 发表评论的订单号
     */
    private String orderId;
    /**
     * 评论内容
     */
    private String comment;
    /**
     * 评论人昵称
     */
    private String nickName;
    /**
     * 评论人头像
     */
    private String headImg;
    /**
     * 更新时间
     */
    private String updateTime;

    public RemarkVO(Remark remark) {
        this.setRemarkId(remark.getRemarkId());
        this.setOrderId(remark.getOrderId());
        this.setNickName(remark.getNickName());
        this.setComment(remark.getComment());
        this.setHeadImg(remark.getHeadImg());
        this.setUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(remark.getUpdateTime()));
    }

    @Override
    public String toString() {
        return "RemarkVO{" +
                "remarkId='" + remarkId + '\'' +
                ", orderId='" + orderId + '\'' +
                ", comment='" + comment + '\'' +
                ", nickName='" + nickName + '\'' +
                ", headImg='" + headImg + '\'' +
                ", updateTime='" + updateTime + '\'' +
                '}';
    }
}
